/*
 *******************************************************************************
 *
 * Copyright (C) 2019-2020 Dialog Semiconductor.
 * This computer program includes Confidential, Proprietary Information
 * of Dialog Semiconductor. All Rights Reserved.
 *
 *******************************************************************************
 */

package com.dialog.suotalib.interfaces.callbacks;

import android.bluetooth.BluetoothDevice;

import com.dialog.suotalib.global.SuotaProfile;

public interface ISuotaScanner {
    /**
     * Gets triggered every time that a non successful start scan request occurs.
     *
     * @param failure reason caused the failure enum
     */
    void onFailure(SuotaProfile.ScanFailure failure);

    /**
     * 每次通过扫描找到新的蓝牙设备时都会触发。
     *
     * @param bluetoothDevice the bluetooth device found
     * @param rssi            the rssi
     * @param scanRecord      the scan record the device advertises
     */
    void onDeviceScan(BluetoothDevice bluetoothDevice, int rssi, byte[] scanRecord);

    /**
     * 每次扫描状态更改时触发.
     *
     * @param newStatus the new scan status
     */
    void onScanStatusChange(SuotaProfile.ScanStatus newStatus);
}
